<template>
	<div id="app">
		<Head :money="keys" />
		<!-- <textarea name="keyboard" ref="keyboard" v-model="keys" id='keyboard' ></textarea> -->
		<Keyborad  :digital="true" :disorderly="false" @typing="keyin" @enter="enter" />
	</div>
</template>

<script>
	import Head from './components/head/head.vue'
	import Keyborad from './components/keyborad/VKeyboard/VKeyboard.vue'
	import vKeyboardUtil from './components/keyborad/VKeyboard/index.js'

	export default {
		name: 'app',
		components: {
			Head,
			Keyborad
		},
		data() {
			return {
				keys: ''
			}
		},
		methods: {
			enter () {
				console.log('回车')
			},
			keyin (data) {
				if (!data.backspace) {
					this.keys = this.keys + data.char;
				}else{
					this.keys = this.keys.substr(0,this.keys.length-1)
				}
				console.log(data)
			}
		}
	}
</script>

<style>
	#app {
		font-family: 'Avenir', Helvetica, Arial, sans-serif;
		-webkit-font-smoothing: antialiased;
		-moz-osx-font-smoothing: grayscale;
		text-align: center;
		color: #2c3e50;
	}
</style>
